(C) 1996 AROS - The Amiga Replacement OS


NAME
#include <utility/name.h>
#include <proto/utility.h>
struct NamedObject * FindNamedObject()
SYNOPSIS
struct NamedObject * nameSpace
STRPTR name
struct NamedObject * lastObject

LOCATION
In UtilityBase at offset 40
FUNCTION
This function will search through a given NameSpace, or the system global NameSpace to find a NamedObject with the name requested. Optionally you can have the search start from a specific NamedObject. This way you can look for each occurence of a specifically named NamedObject in a NameSpace that allows for duplicates.

INPUTS
nameSpace
The NameSpace to search through. If NULL will use the system default NameSpace.
name
The name of the object to search for. If NULL, any and all NamedObjects will be matched.
lastObject
The (optional) last NamedObject to start the search from.
RESULT
If a NamedObject with the name supplied exists, it will be returned. Otherwise will return NULL.

When you have finised with this NamedObject, you should call ReleaseNamedObject( NamedObject ).

NOTES
If you are going to use a returned NamedObject to be the starting point for another search you must call ReleaseNamedObject() AFTER searching, as the ReleaseNamedObject() call can cause the NamedObject to be freed, leaving you with an invalid pointer.

EXAMPLE
BUGS
SEE ALSO
ReleaseNamedObject()
INTERNALS
Could we implement named objects with hash chains perhaps? Possibly not as then NextObject handling would be quite tricky.

HISTORY
10.02.1997 digulla
Added cast
09.02.1997 iaint
Fixed some nasty bugs in NamedObjects
27.01.1997 digulla
Added #include <proto/exec.h>
27.01.1997 ldp
Polish
18.12.1996 iaint
NamedObjects